package com.yugao.fintech.antelope.mps.manager;

import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yugao.fintech.antelope.mps.mapper.MsgPushTaskMapper;
import com.yugao.fintech.antelope.mps.model.entity.MsgPushTask;
import com.yugao.fintech.framework.core.annotations.FieldUniqueCheck;
import com.yugao.fintech.framework.core.enums.OperationTypeEnum;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Repository;

/**
 * 消息推送任务 仓储层
 *

 */
@Slf4j
@Repository
public class MsgPushTaskManager extends ServiceImpl<MsgPushTaskMapper, MsgPushTask>
    implements IService<MsgPushTask> {

    @FieldUniqueCheck(type = OperationTypeEnum.SAVE)
    public boolean savePushTask(MsgPushTask entity) {
        return this.save(entity);
    }

    @FieldUniqueCheck(type = OperationTypeEnum.UPDATE)
    public boolean updatePushTask(MsgPushTask entity) {
        return this.updateById(entity);
    }
}
